package com.wfit;

import com.wfit.config.JwtProperties2;
import lombok.RequiredArgsConstructor;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.security.crypto.password.PasswordEncoder;


@SpringBootTest
@RequiredArgsConstructor
public class test01 {
    @Autowired
    private PasswordEncoder passwordEncoder;
    @Autowired
    private JwtProperties2 jwtProperties;
    @Test
    public void test01(){
        System.out.println(passwordEncoder.encode("123456"));
        boolean matches = passwordEncoder.matches("123456", "$2a$10$VH3.pUAQ92lwx3M8ymLmt.mWnSLs5ZSoFUjENYi1flbfhgWNLNV4u");
        System.out.println(matches);
    }
    @Test
    public void test02(){
        System.out.println(passwordEncoder.encode("123456"));
        boolean matches = passwordEncoder.matches("123456", "$2a$10$VH3.pUAQ92lwx3M8ymLmt.mWnSLs5ZSoFUjENYi1flbfhgWNLNV4u");
        System.out.println(matches);
    }
}
